﻿using System;
using System.Collections.Generic;
using System.Text;
using SD.LLBLGen.Pro.ApplicationCore;
using System.Windows.Forms;
using SD.LLBLGen.Pro.ApplicationCore.Entities;

namespace SD.LLBLGen.Pro.Plugins
{
    public class EntityVisualizer : PluginBase
    {
        private const string _version = "2.6.0.0";
        private const string _build = "06142007";

        public EntityVisualizer()
        {
        }    

        public override PluginDescription Describe()
        {
            PluginDescription toReturn = base.Describe();

            toReturn.Build = _build;
            toReturn.Description = "Display the data of the specific mapping entity";
            toReturn.Id = new Guid("{1CCEEDD1-AD19-49c9-B711-BE2087D0F94A}");
            toReturn.Name = "Entity Visualizer Plug-in";
            toReturn.ShowProgressViewerDuringExecution = false;
            toReturn.TargetType = PluginTargetType.Entity;
            //toReturn.TypeOfPlugin = PluginType.SingleElementPlugin;
            toReturn.TypeOfPlugin = PluginType.DirectRun;
            toReturn.Vendor = "EPN Solution";
            toReturn.Version = _version;
            toReturn.SurpressProjectExplorerRedraw = false;
            return toReturn;
        }

        public override void Execute()
        {          
            EntityVisualizerControl _control = new EntityVisualizerControl(base.ProjectToTarget.ConnectionString, this);
            base.OpenDockedWindow(_control);
        }
    }
}
